package factory;

import java.math.BigDecimal;
import java.sql.Ref;

/**
 * @ClassName TestReferenceDemo
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2021/7/13 18:20
 * @Version 1.0
 */
public class TestReferenceDemo {
	public static void main(String[] args) {
		BigDecimal a = BigDecimal.ZERO;
		final Refe ref = new Refe();
		ref.temp = BigDecimal.ZERO;
		add(ref);
		System.out.println(ref.temp);
	}

	private static void add(Refe a) {
		a.temp = a.temp.add(BigDecimal.TEN);
	}


}
class Refe{
	public Refe(){}
	public BigDecimal temp;
}
